using Microsoft.Expression.Drawing.Core;
using System;
namespace Microsoft.Expression.Controls
{
	internal class EvenDistributionStrategy : DistributionStrategy
	{
		public override int ComputeAutoCapacity()
		{
			return (int)Math.Ceiling((double)base.PathPanel.Count / (double)base.PathPanel.ValidPaths.get_Count());
		}
		public override void OnPolylineBegin(PolylineData polyline)
		{
			base.Step = double.NaN;
			if (base.Capacity > 1)
			{
				if (!polyline.IsClosed)
				{
					if (base.LayoutPath.FillBehavior != FillBehavior.NoOverlap)
					{
						base.Step = base.Span / (double)(base.Capacity - 1);
						return;
					}
				}
				base.Step = base.Span / (double)base.Capacity;
				return;
			}
		}
	}
}
